home *** CD-ROM | disk | FTP | other *** search
- Path: pub.news.uk.psi.net!usenet
- From: Andrew Palmer <a.palmer@kainos.com>
- Newsgroups: comp.lang.c++
- Subject: Templates as the type of a template
- Date: Thu, 11 Apr 1996 15:21:59 +0100
- Organization: Kainos Software Ltd.
- Message-ID: <316D1587.167EB0E7@kainos.com>
- NNTP-Posting-Host: 193.195.13.27
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0 (X11; I; SunOS 4.1.3 sun4c)
-
- Hello,
-
- I'm using Sun's CC compiler from Sparcworks 3.0.1 and I'm having a
- little trouble passing a template class as the type of another template
- class.
-
- I have one template class called "list" and I can use "list<int> foo"
- fine.
- I have another template class called "vector" and I can use
- "vector<int> bar;" fine as well.
-
- But I don't seem to be able to have a list of vectors of type int,
- e.g. "list<vector<int>> foobar;" doesn't work.
-
- I can get round the problem by "typedef vector<int> iVector;
- list<iVector> foobar;"
-
- Am I doing something wrong in the syntax or is it just one of those
- things that doesn't work?
-
-
- ************************************
- * Andrew H. Palmer *
- * - work: a.palmer@kainos.com *
- * - home: andrew@ghost.demon.co.uk *
- ************************************
-